//
//  Encrypt.h
//  APJ Resource
//
//  Created by Richard Zhao on 2/10/14.
//  Copyright (c) 2014 APJ. All rights reserved.
//

#import <Foundation/Foundation.h>
#define SALT_LENGTH 16

@interface Encrypt : NSObject

+ (BOOL) isHashMatchedFrom:(NSString *)plainText to:(NSString *)hasedText;
+ (NSData *)combineBytes:(NSData *)b1 with:(NSData *)b2;
+ (NSData *)computeHashWith:(NSData *)plainText;
+ (NSData *)extractSaltFrom:(NSData *)hashedText;
+ (BOOL)compareBytes:(NSData *)b1 with:(NSData *)b2;
+ (BOOL)compareText:(NSData *)plainText withHash:(NSData *)hashedText;
+ (NSData*) base64Decode:(NSString *)string;
@end
